Skip to content

Conversation

@forfudan
Copy link
Owner

@forfudan forfudan commented Mar 18, 2025

This pull request includes several changes to the benches/bench.mojo file, new benchmarking functions for Decimal.from_int, updates to the mojoproject.toml file, and improvements to the Decimal struct in src/decimojo/decimal.mojo. The most important changes include adding new benchmark cases, updating the mojoproject.toml with new test and benchmark commands, and refining the Decimal struct's methods and documentation.

New Benchmark Functions:

  • Added comprehensive benchmarks for the Decimal.from_int constructor in benches/bench_from_int.mojo. This includes performance comparisons against Python's decimal module with 20 diverse test cases.

Updates to Benchmark and Test Commands:

  • Updated benches/bench.mojo to include new benchmarks for bench_from_int and bench_root.
  • Modified mojoproject.toml to add new test and benchmark commands for test_from_int and bench_from_int.

Improvements to Decimal Struct:

  • Refined the Decimal struct in src/decimojo/decimal.mojo by updating method documentation and adding a new copy method and a new clone method.
    These changes enhance the benchmarking capabilities, improve the organization of test commands, and refine the Decimal struct for better clarity and functionality.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 18, 2025

Deploying decimojo with  Cloudflare Pages  Cloudflare Pages

Latest commit: c677718
Status: ✅  Deploy successful!
Preview URL: https://6ec38d0f.decimojo.pages.dev
Branch Preview URL: https://clean.decimojo.pages.dev

View logs

@forfudan forfudan changed the title [decimal] RefineDecimal struct + improve docstrings [decimal] Refine Decimal struct + improve docstrings Mar 18, 2025
@forfudan forfudan merged commit 7448804 into main Mar 18, 2025
1 of 2 checks passed
@forfudan forfudan deleted the clean branch March 18, 2025 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants